import sim
import net
import checkNet

def checkNetStatus():
    stage, state = checkNet.waitNetworkReady(10)
    if stage == 3 and state == 1:
        print('Network connection successful.')
        return True
    else:
        print('Network connection failed, stage={}, state={}'.format(stage, state))
        return False
    
class simCard:
    def __init__(self):
        self.Imsi = sim.getImsi()
        self.Iccid = sim.getIccid()
    @property
    def GetImsi(self):
        return self.Imsi    
    @property
    def GetIccid(self):
        return self.Iccid

class simNet:
    def __init__(self):
        self.NetState = False
    @property
    def GetNetStatus(self):
        self.NetState = checkNetStatus()
        return self.NetState
    
    @property
    def GetNetQyeryPoll(self):
        return net.csqQueryPoll()
    



